<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Lotto</title>
<link href="../css/member_global.css?t={ctime}" rel="stylesheet" type="text/css" />
<link href="../css/member_main_lot_all.css?t={ctime}" rel="stylesheet" type="text/css">
<link href="../css/member_main_lot_b{LottoID}.css?t={ctime}" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
var sid = "{sid}";
var RefreshSec = 20;
var intRefreshSec = 0;
var isRefresh = true;
var setIntervalID1 = 0, setIntervalID2 = 0;
var strEndGameTime = "{EndGameTime}";

function InsertOdds(){
	var intBT = 0;
	var newTD, intNum = 0;
	var arrBT = new Array(18, 19, 20, 21, 22, 14, 14, 14, 14, 15, 15, 15, 15);
	var arrBTMinNum = new Array(0, 0, 0, 0, 0, 0, 10, 20, 30, 0, 10, 20, 30);
	var arrBTMaxNum = new Array(9, 9, 9, 9, 9, 1, 11, 21, 31, 1, 11, 21, 31);
	var arrOddsPlus = new Array(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1);

	for(var i = 0; i < arrBT.length; i++){
		intBT = arrBT[i];
		var ArrGame = eval("parent.Game" + intBT.toString());

		for (intNum = arrBTMinNum[i]; intNum <= arrBTMaxNum[i]; intNum++){

			newTD = document.getElementById("OddsID" + intBT.toString() + "_" + intNum.toString());
			if(ArrGame[intNum][6] == "1"){
				newTD.className = "mbline_ratio_stop";
			}else{
				newTD.className = "mbline_ratio";
			}
			newTD.innerHTML = "<a href=\"wager_common.php?UserID="+parent.strUserID+"&GambleID="+ArrGame[intNum][1]+"&Bet_Type="+ArrGame[intNum][2]+"&OddsID="+ArrGame[intNum][4]+"&Odds="+ArrGame[intNum][5]+"&LottoID="+ArrGame[intNum][0]+"&Number="+intNum.toString()+"&sid="+sid+"\" target=\"leftFrame\" id=\"OddsTip1_"+intNum.toString()+"\">"+(Math.round((arrOddsPlus[i] + parseFloat(ArrGame[intNum][5]))*1000)/1000)+"</a>";
		}
	}
}

function CountRefresh(){
	var Digital=new Date(), strDate2 = "", arrD1 = new Array(), arrD2 = new Array(), intGT = 0, intGT2 = 0, strGTm = "", strGTs = "";
	with(Digital){
		strDate2 = getFullYear().toString() + "-" + (getMonth() + 1 < 10?"0":"") + (getMonth() + 1).toString() + "-" + (getDate() < 10?"0":"") + getDate().toString() + " " + getHours().toString() + ":" + getMinutes().toString() + ":" + getSeconds().toString();
	}
	arrD1 = strEndGameTime.split(" ");
	arrD2 = strDate2.split(" ");
	if(arrD2[1] > arrD1[1] && arrD1[0] == arrD2[0]){
		RefreshSec = 5;
	}

	if(intRefreshSec >= RefreshSec)isRefresh = true;
	intGT = parseInt(parent.strGameTime);
	if(intGT < 0)intGT = 0;
	intGT2 = (intGT > 900)?900:intGT;
	strGTm = (Math.floor(intGT2 / 60)).toString();
	if(strGTm.length < 2)strGTm = "0" + strGTm;
	strGTs = (intGT2 % 60).toString();
	if(strGTs.length < 2)strGTs = "0" + strGTs;
	document.getElementById("GameSec").innerHTML = strGTm+":"+strGTs;
	parent.strGameTime = intGT - 1;
	intRefreshSec++;
	//window.status = intRefreshSec;
}

function SubmitOddsForm(){
	if(isRefresh == false){
		document.GetOddsForm.action = "https://tw.i1.yimg.com/tw.yimg.com/i/tw/weather/02.gif";
		document.GetOddsForm.submit();
		window.status = "";
		return;
	}
	document.GetOddsForm.action = "7star18_odds.php";
	document.GetOddsForm.submit();
	isRefresh = false;
	intRefreshSec = 0;
}

function DisplayWindow(){
	var i = 0;
	score_window.style.display = parent.strDisplay;
	if(parent.strDisplay != "none"){
		for(var i = 0; i < parent.arrImages.length; i++){
			document.getElementById("image" + (i + 1)).src = "../images/ball/"+parent.arrImages[i]+".gif";
		}
	}
}

function InitAction(){
	document.GetOddsForm.submit();
	setIntervalID1 = setInterval("SubmitOddsForm();", 120000);
	setIntervalID2 = setInterval("CountRefresh();", 1000);
}
//-->
</script>
</head>

<body onload="InitAction()" oncontextmenu="window.event.returnValue=false" ondragstart="window.event.returnValue=false" onselectstart="event.returnValue=false">
<!--Get Odds Form//-->
<form action="7star18_odds.php" target="hiddenTop" name="GetOddsForm">
	<input type="hidden" name="LottoID" value="{LottoID}">
	<input type="hidden" name="Bet_Type" value="14,15,18,19,20,21,22">
	<input type="hidden" name="MSite" value="{MSite}">
	<input type="hidden" name="sType" value="o">
	<input type="hidden" name="sid" value="{sid}">
</form>
<!--Get Odds Form//-->

<!--樣式2-->
<div class="topStyle_2">
<table class="mtop" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
	<td colspan="2" align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td align="center" class="menu_title">{Title}</td>
			<td align="right" valign="top" class="mictxt">{GameNo}:<em id="GameNo">0</em>{GameTime}<em id="GameSec" >00:00</em>({ChinaTime} <a id="ChinaTime">&nbsp;</a>)
				<input type="button" value="{Refresh}" class="zabottonR" onclick="SubmitOddsForm();">
			</td>
		</tr>
		</table></td>
</tr>
<tr class="menu_tab">
	<td width="78%" nowrap="nowrap" class="menu_tab" >&nbsp;</td>
	<td width="22%" valign="bottom" nowrap="nowrap" ><a href="{SelfFile}?stype=c&sid={sid}&LottoID={LottoID}"><img src="../images/lottery/mode_2.jpg" width="75" height="19" alt="{CommonType}" /></a><a href="{SelfFile}?stype=o&sid={sid}&LottoID={LottoID}"><img src="../images/lottery/mode_3.jpg" width="75" height="19" alt="{OddsType}" /></a></td>
</tr>
</table>
</div>
<!--共用樣式-->

<table width="725" border="0" cellpadding="0" cellspacing="0" class="mbtab_ont">
<thead>
  <tr>
    <td colspan="2">{Milli}</td>
    <td colspan="2">{Cent}</td>
    <td colspan="2">{Dec}</td>
    <td colspan="2">{Unit}</td>
    <td colspan="2">{NotFix}</td>
    </tr>
  </thead>
  <tbody><tr class="mbtitle">
    <td width="70">{Number}</td>
    <td width="75">{Odds}</td>
    <td width="70">{Number}</td>
    <td width="75">{Odds}</td>
    <td width="70">{Number}</td>
    <td width="75">{Odds}</td>
    <td width="70">{Number}</td>
    <td width="75">{Odds}</td>
    <td width="70">{Number}</td>
    <td width="75">{Odds}</td>
    </tr>
  <tr class="mcen">
    <th>0</th>
    <td class="mbline_ratio" id="OddsID18_0">0.0</td>
    <th>0</th>
    <td class="mbline_ratio" id="OddsID19_0">0.0</td>
    <th>0</th>
    <td class="mbline_ratio" id="OddsID20_0">0.0</td>
    <th>0</th>
    <td class="mbline_ratio" id="OddsID21_0">0.0</td>
    <th>0</th>
    <td class="mbline_ratio" id="OddsID22_0">0.0</td>
  </tr>
  <tr class="mcen">
    <th>1</th>
    <td class="mbline_ratio" id="OddsID18_1">0.0</td>
    <th>1</th>
    <td class="mbline_ratio" id="OddsID19_1">0.0</td>
    <th>1</th>
    <td class="mbline_ratio" id="OddsID20_1">0.0</td>
    <th>1</th>
    <td class="mbline_ratio" id="OddsID21_1">0.0</td>
    <th>1</th>
    <td class="mbline_ratio" id="OddsID22_1">0.0</td>
  </tr>
  <tr class="mcen">
    <th>2</th>
    <td class="mbline_ratio" id="OddsID18_2">0.0</td>
    <th>2</th>
    <td class="mbline_ratio" id="OddsID19_2">0.0</td>
    <th>2</th>
    <td class="mbline_ratio" id="OddsID20_2">0.0</td>
    <th>2</th>
    <td class="mbline_ratio" id="OddsID21_2">0.0</td>
    <th>2</th>
    <td class="mbline_ratio" id="OddsID22_2">0.0</td>
  </tr>
  <tr class="mcen">
    <th>3</th>
    <td class="mbline_ratio" id="OddsID18_3">0.0</td>
    <th>3</th>
    <td class="mbline_ratio" id="OddsID19_3">0.0</td>
    <th>3</th>
    <td class="mbline_ratio" id="OddsID20_3">0.0</td>
    <th>3</th>
    <td class="mbline_ratio" id="OddsID21_3">0.0</td>
    <th>3</th>
    <td class="mbline_ratio" id="OddsID22_3">0.0</td>
  </tr>
  <tr class="mcen">
    <th>4</th>
    <td class="mbline_ratio" id="OddsID18_4">0.0</td>
    <th>4</th>
    <td class="mbline_ratio" id="OddsID19_4">0.0</td>
    <th>4</th>
    <td class="mbline_ratio" id="OddsID20_4">0.0</td>
    <th>4</th>
    <td class="mbline_ratio" id="OddsID21_4">0.0</td>
    <th>4</th>
    <td class="mbline_ratio" id="OddsID22_4">0.0</td>
  </tr>
  <tr class="mcen">
    <th>5</th>
    <td class="mbline_ratio" id="OddsID18_5">0.0</td>
    <th>5</th>
    <td class="mbline_ratio" id="OddsID19_5">0.0</td>
    <th>5</th>
    <td class="mbline_ratio" id="OddsID20_5">0.0</td>
    <th>5</th>
    <td class="mbline_ratio" id="OddsID21_5">0.0</td>
    <th>5</th>
    <td class="mbline_ratio" id="OddsID22_5">0.0</td>
  </tr>
  <tr class="mcen">
    <th>6</th>
    <td class="mbline_ratio" id="OddsID18_6">0.0</td>
    <th>6</th>
    <td class="mbline_ratio" id="OddsID19_6">0.0</td>
    <th>6</th>
    <td class="mbline_ratio" id="OddsID20_6">0.0</td>
    <th>6</th>
    <td class="mbline_ratio" id="OddsID21_6">0.0</td>
    <th>6</th>
    <td class="mbline_ratio" id="OddsID22_6">0.0</td>
  </tr>
  <tr class="mcen">
    <th>7</th>
    <td class="mbline_ratio" id="OddsID18_7">0.0</td>
    <th>7</th>
    <td class="mbline_ratio" id="OddsID19_7">0.0</td>
    <th>7</th>
    <td class="mbline_ratio" id="OddsID20_7">0.0</td>
    <th>7</th>
    <td class="mbline_ratio" id="OddsID21_7">0.0</td>
    <th>7</th>
    <td class="mbline_ratio" id="OddsID22_7">0.0</td>
  </tr>
  <tr class="mcen">
    <th>8</th>
    <td class="mbline_ratio" id="OddsID18_8">0.0</td>
    <th>8</th>
    <td class="mbline_ratio" id="OddsID19_8">0.0</td>
    <th>8</th>
    <td class="mbline_ratio" id="OddsID20_8">0.0</td>
    <th>8</th>
    <td class="mbline_ratio" id="OddsID21_8">0.0</td>
    <th>8</th>
    <td class="mbline_ratio" id="OddsID22_8">0.0</td>
  </tr>
  <tr class="mcen">
    <th>9</th>
    <td class="mbline_ratio" id="OddsID18_9">0.0</td>
    <th>9</th>
    <td class="mbline_ratio" id="OddsID19_9">0.0</td>
    <th>9</th>
    <td class="mbline_ratio" id="OddsID20_9">0.0</td>
    <th>9</th>
    <td class="mbline_ratio" id="OddsID21_9">0.0</td>
    <th>9</th>
    <td class="mbline_ratio" id="OddsID22_9">0.0</td>
  </tr>
  <tr class="mcen"><!--單//-->
    <th>{Odd}</th>
    <td class="mbline_ratio" id="OddsID14_0">0.00</td>
    <th>{Odd}</th>
    <td class="mbline_ratio" id="OddsID14_10">0.00</td>
    <th>{Odd}</th>
    <td class="mbline_ratio" id="OddsID14_20">0.00</td>
    <th>{Odd}</th>
    <td class="mbline_ratio" id="OddsID14_30">0.00</td>
    <th>&nbsp;</th>
    <td class="mbline_ratio">&nbsp;</td>
  </tr>
  <tr class="mcen"><!--雙//-->
    <th>{Even}</th>
    <td class="mbline_ratio" id="OddsID14_1">0.00</td>
    <th>{Even}</th>
    <td class="mbline_ratio" id="OddsID14_11">0.00</td>
    <th>{Even}</th>
    <td class="mbline_ratio" id="OddsID14_21">0.00</td>
    <th>{Even}</th>
    <td class="mbline_ratio" id="OddsID14_31">0.00</td>
    <th>&nbsp;</th>
    <td class="mbline_ratio">&nbsp;</td>
  </tr>
  <tr class="mcen"><!--大//-->
    <th>{Over}</th>
    <td class="mbline_ratio" id="OddsID15_0">0.00</td>
    <th>{Over}</th>
    <td class="mbline_ratio" id="OddsID15_10">0.00</td>
    <th>{Over}</th>
    <td class="mbline_ratio" id="OddsID15_20">0.00</td>
    <th>{Over}</th>
    <td class="mbline_ratio" id="OddsID15_30">0.00</td>
    <th>&nbsp;</th>
    <td class="mbline_ratio">&nbsp;</td>
  </tr>
  <tr class="mcen"><!--小//-->
    <th>{Under}</th>
    <td class="mbline_ratio" id="OddsID15_1">0.00</td>
    <th>{Under}</th>
    <td class="mbline_ratio" id="OddsID15_11">0.00</td>
    <th>{Under}</th>
    <td class="mbline_ratio" id="OddsID15_21">0.00</td>
    <th>{Under}</th>
    <td class="mbline_ratio" id="OddsID15_31">0.00</td>
    <th>&nbsp;</th>
    <td class="mbline_ratio">&nbsp;</td>
  </tr>
</tbody></table>

</body>
</html>